package basis.hashset;

import lombok.Data;

@Data
public class Student {
    public Student(String name){
        this.name = name;
    }

    public String name;

    @Override
    public int hashCode() {
        int result = 17;

        result = result * 31 + name == null ? 0 : name.hashCode();
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if(this == obj){
            return true;
        }
        if(obj instanceof Student){
            Student obj1 = (Student) obj;
            boolean equals = this.name.equals(obj1.name);
            return equals;
        }
        return false;
    }

}
